package com.yicong.ants.view;

import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.TextView;

import com.yicong.ants.R;
import com.yicong.ants.utils.L;

/**
 * 加载中过渡
 */
public class LoadingPop extends BasePopupWindow {

    public LoadingPop(Context context) {
        super(context);
    }

    @Override
    public void initSetting() {
        this.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
        this.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
        this.setOutsideTouchable(true);
    }

    @Override
    public void initView() {
        mView = LayoutInflater.from(mContext).inflate(R.layout.popup_window_logon_loading, null);
    }

    public void setmLoadTxt(String mLoadTxt) {
        if (!TextUtils.isEmpty(mLoadTxt)) {
            L.e("----->", mLoadTxt);
            TextView textView = mView.findViewById(R.id.tv_content);
            textView.setText(mLoadTxt);
        }
    }
}
